package com.sf.protal.service;

import com.sf.protal.mapper.UmsConsumerMapper;
import com.sf.protal.pojo.UmsConsumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UmsConsumerService {
	@Autowired
	private UmsConsumerMapper umsConsumerMapper;

	public List<UmsConsumer> getAllConsumerList() {
		List<UmsConsumer> consumers = umsConsumerMapper.selectAll();
		return consumers;
	}

	/**
	 * 新增客户信息
	 *
	 * @param umsConsumer
	 * @return
	 */
	public boolean addConsumerInfo(UmsConsumer umsConsumer) {
		int rows = umsConsumerMapper.insert(umsConsumer);
		return rows > 0 ? true : false;
	}
}
